/*    */ package com.newcrm.util;
/*    */ 
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpSession;
/*    */ 
/*    */ public class CaptchaUtil
/*    */ {
/*    */   public static boolean checkCode(HttpServletRequest request, String code)
/*    */   {
/*  9 */     if ((code == null) || (code.trim().length() == 0)) {
/* 10 */       return false;
/*    */     }
/*    */ 
/* 13 */     HttpSession session = request.getSession(false);
/* 14 */     if (session == null) {
/* 15 */       return false;
/*    */     }
/*    */ 
/* 18 */     String s = (String)session
/* 19 */       .getAttribute("KAPTCHA_SESSION_KEY");
/*    */ 
/* 21 */     return code.equals(s);
/*    */   }
/*    */ }

/* Location:           C:\E\referenceProject\CRM参考\qikebao\WEB-INF\lib\qikebao.jar
 * Qualified Name:     com.newcrm.util.CaptchaUtil
 * JD-Core Version:    0.6.1
 */